import Vue from 'vue'
window.m_popQueue = new Map()
Vue.mixin({
  created () {
    this.$m_destroyed = []
    this.$m_popQueue = []
    if (!this.$route ) return
    const {name} = this.$route
    if (!name) return
    m_popQueue.set(name)
  },
  destroyed () {
    this.$m_destroyed.forEach(x => x())
  }
})